//
//  QDQuesFeedTableViewCell.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/3/3.
//  Copyright © 2019 YueWen. All rights reserved.
//

import Foundation

/// 问题描述的cell
protocol QDQuesFeedTableViewCell {
    
    /// 头部标签
    var titleLabel: UILabel { get }
    
    /// 初始化titleLabel的属性
    func initTitleLabel()
    
    /// 装载titleLabel的布局
    func makeConstraintsForTitleLabel()
}


extension QDQuesFeedTableViewCell {
    
    func initTitleLabel(){
        titleLabel.text = "请选择问题类型（必选）"
        titleLabel.textColor = QDColors.black
        titleLabel.font = Font.light.font(size: 16)
    }
    
    func makeConstraintsForTitleLabel() {
        
        titleLabel.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(20)
            make.height.equalTo(22)
            make.top.equalToSuperview().offset(8)
        }
    }
}

extension QDQuesFeedTableViewCell where Self:UITableViewCell {
    
    /// 设置初始化数据并addView
    func initTitleLabel(){
        
        titleLabel.textColor = QDColors.black
        titleLabel.font = Font.light.font(size: 16)
        contentView.addSubview(titleLabel)
    }
}
